package com.test.springboot3.springboot3testdemo1.controller;

import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/8/2-下午2:20
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@Controller
public class ThymeleafController {
  @GetMapping(value = "/test/{content}")
  public String test(@PathVariable("content") String content, HttpServletRequest request) {
    request.setAttribute("content", content);
    return "test";
  }

  @GetMapping(value = "/test/index")
  public String index() {
    return "index";
  }
}
